import request from '@/utils/request'

// 查询记账单明细列表
export function listFinanceOrderItem(query) {
  return request({
    url: '/finance/financeOrderItem/list',
    method: 'post',
    data: query
  })
}

// 查询记账单明细详细
export function getFinanceOrderItem(id) {
  return request({
    url: '/finance/financeOrderItem/' + id,
    method: 'get'
  })
}

// 新增记账单明细
export function addFinanceOrderItem(data) {
  return request({
    url: '/finance/financeOrderItem/add',
    method: 'post',
    data: data
  })
}

// 修改记账单明细
export function updateFinanceOrderItem(data) {
  return request({
    url: '/finance/financeOrderItem/update',
    method: 'post',
    data: data
  })
}

// 删除记账单明细
export function delFinanceOrderItem(id) {
  return request({
    url: '/finance/financeOrderItem/delete/' + id,
    method: 'post'
  })
}

export function generateRevolvePurchaseOrder(purchaseOrderId,purchaseLevel) {
  return request({
    url: '/finance/financeOrderItem/generateRevolvePurchaseOrder?purchaseOrderId='+purchaseOrderId+'&purchaseLevel='+purchaseLevel,
    method: 'get'
  })
}

